Skip to content

Update to lxml 6.0.0 and fix GitHub Actions #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 9, 2025
Merged

Conversation

TomiBelan
Copy link
Contributor

This PR updates the libxml2+libxslt versions to be compatible with lxml 6.0.0, and fixes various other issues that were preventing manylinux wheels from being built (per @mxamin #344 (comment)), as well as other broken CI workflows.

TomiBelan and others added 12 commits July 5, 2025 16:15
The server at www.aleksey.com (Cloudflare?) returns 403 Forbidden errors for
some combination of:

- missing User-Agent header
- GitHub Actions CI runner IP address range
- TLS settings (version, cipher suite) used by Python <= 3.9
This solves the warning:
configure: WARNING: you should use --build, --host, --target
@TomiBelan
Copy link
Contributor Author

@mxamin
Copy link
Collaborator

mxamin commented Jul 9, 2025

@TomiBelan Looks good, you can merge that.

@TomiBelan
Copy link
Contributor Author

@mxamin Thanks but I don't have write access to your repo. You have to merge it.

@mxamin mxamin merged commit 3f1dfe5 into xmlsec:master Jul 9, 2025
79 of 91 checks passed
@TomiBelan
Copy link
Contributor Author

Thanks for reviewing it! :)
I guess the next step is to make a new release, in order to really fix the linked issues. Although, for Windows wheels, I'm not sure, you might need to update the Windows libraries first (especially libxml 2.14.4).

@potiuk
Copy link

potiuk commented Jul 9, 2025

Thanks for reviewing it! :) I guess the next step is to make a new release, in order to really fix the linked issues. Although, for Windows wheels, I'm not sure, you might need to update the Windows libraries first (especially libxml 2.14.4).

Yep. Would be great to get notified when it is released indeed and unblock apache/airflow#52539 as well

@mxamin
Copy link
Collaborator

mxamin commented Jul 9, 2025

Thanks for reviewing it! :) I guess the next step is to make a new release, in order to really fix the linked issues. Although, for Windows wheels, I'm not sure, you might need to update the Windows libraries first (especially libxml 2.14.4).

Yep. Would be great to get notified when it is released indeed and unblock apache/airflow#52539 as well

I'm actively working on that during summer and planning to release it soon, but first I need to solve the libxml2 incompatibility issue.

@TomiBelan
Copy link
Contributor Author

I'm actively working on that during summer and planning to release it soon, but first I need to solve the libxml2 incompatibility issue.

libxml2 incompatibility issue? Tell me more. Is there some other issue this PR doesn't fix? I can try and take a look.

I thought Windows wheels won't be a problem, because the python-xmlsec 1.3.15 release contained them. I assume someone built them manually.

If it might take a while until the release, you might want to reopen #344 for now. (I don't have access.)

@TomiBelan
Copy link
Contributor Author

(especially libxml 2.14.4).

Correction - I just found that lxml 6.0.0 windows wheels use "libxml2 2.11.9, libxslt 1.1.39 and libiconv 1.17" (link). Sorry for any confusion.

@mxamin
Copy link
Collaborator

mxamin commented Jul 9, 2025

I'm actively working on that during summer and planning to release it soon, but first I need to solve the libxml2 incompatibility issue.

libxml2 incompatibility issue? Tell me more. Is there some other issue this PR doesn't fix? I can try and take a look.

I thought Windows wheels won't be a problem, because the python-xmlsec 1.3.15 release contained them. I assume someone built them manually.

If it might take a while until the release, you might want to reopen #344 for now. (I don't have access.)

Take a look at this issue: #283
I guess I can take care of windows wheels, I'll take a look.

On the second thought I probably release a new version soon and solve the incompatibility issue later. It requires lots of changes and cleanup.

@TomiBelan
Copy link
Contributor Author

I see... That's beyond my ability to fix. 😅
Releasing this soon and solving the incompatibility later sounds like a good plan to me. Good luck!
I'll send you a python-xmlsec-win-binaries PR in a moment. (it's pretty trivial though, not like this one)

@mxamin
Copy link
Collaborator

mxamin commented Jul 9, 2025

I see... That's beyond my ability to fix. 😅 Releasing this soon and solving the incompatibility later sounds like a good plan to me. Good luck! I'll send you a python-xmlsec-win-binaries PR in a moment. (it's pretty trivial though, not like this one)

Nice, I created a PR but I'm not sure if it's gonna pass. Feel free to create a PR and I'm gonna use yours if it works :)

@TomiBelan
Copy link
Contributor Author

(it's pretty trivial though, not like this one)

Narrator: looks straight at camera


I made some progress. (draft, CI, draft, CI) For some reason, every build takes 1 hour. Very annoying.

Turns out that xmlsec 1.3.7 switched the default windows backend from openssl to mscng. Which do you prefer: Should python-xmlsec follow suit, or switch it back to openssl?

Also, JFYI, xmlsec 1.3.6 disabled iconv on windows by default. But iconv is apparently also used by libxml2, so, might as well keep it enabled.

@mxamin
Copy link
Collaborator

mxamin commented Jul 9, 2025

(it's pretty trivial though, not like this one)

Narrator: looks straight at camera

I made some progress. (draft, CI, draft, CI) For some reason, every build takes 1 hour. Very annoying.

Turns out that xmlsec 1.3.7 switched the default windows backend from openssl to mscng. Which do you prefer: Should python-xmlsec follow suit, or switch it back to openssl?

Also, JFYI, xmlsec 1.3.6 disabled iconv on windows by default. But iconv is apparently also used by libxml2, so, might as well keep it enabled.

openssl vs mscng: I guess we'd better follow xmlsec and use mscng if possible. Also I have no objection to continue using openssl. I'll leave it to you to decide.
iconv: I see no harm to keep it.

@TomiBelan
Copy link
Contributor Author

OK, I got it to work. (successful build)

Do this next:

  1. Review and merge Update libraries, support ARM, force OpenSSL backend mxamin/python-xmlsec-win-binaries#4
  2. Wait for GitHub Actions to build it
  3. Create a release in python-xmlsec-win-binaries and add the built zip files
  4. Add this commit TomiBelan@24affa7 to your PR Fix windows wheels and add ARM support #354 (or just copy changes manually)
  5. Set release_url in setup.py to the new release you created
  6. If CI becomes green, merge it
  7. Release python-xmlsec

@mxamin
Copy link
Collaborator

mxamin commented Jul 10, 2025

OK, I got it to work. (successful build)

Do this next:

  1. Review and merge Update libraries, support ARM, force OpenSSL backend mxamin/python-xmlsec-win-binaries#4
  2. Wait for GitHub Actions to build it
  3. Create a release in python-xmlsec-win-binaries and add the built zip files
  4. Add this commit TomiBelan@24affa7 to your PR Fix windows wheels and add ARM support #354 (or just copy changes manually)
  5. Set release_url in setup.py to the new release you created
  6. If CI becomes green, merge it
  7. Release python-xmlsec

Thanks a lot for the help, the new release is out.

@TomiBelan
Copy link
Contributor Author

Excellent!

Was there some problem with Windows ARM that made you revert it? (Personally I don't care, it can wait for the next release.)

I think https://pypi.org/project/xmlsec/#files is missing the sdist (source distribution).

@mxamin
Copy link
Collaborator

mxamin commented Jul 10, 2025

Oh, my bad. I forgot to add the arm back after testing that :(
I'll add it in the next release.

I'll add the sdist.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants